#include <cctype>
#include <cstdio>

typedef long long ll;

template <typename T>
inline T& read(T& x) {
  x = 0;
  bool f = false;
  short ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = true;
    ch = getchar();
  }
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ '0'), ch = getchar();
  if (f) x = -x;
  return x;
}

const int N = 2e5 + 5;
int n, q, A[N], stk[N], dfn[N], dfr[N], dfc;
int dep[N], fa[N], siz[N], son[N], top[N];
int e_cnt, heads[N];

struct Edge {
  int v, nxt;
} e[N << 1];

inline void add(int u, int v) {
  e[++e_cnt].v = v, e[e_cnt].nxt = heads[u], heads[u] = e_cnt;
}

void dfs1(int u) {
  dep[u] = dep[fa[u]] + 1, siz[u] = 1;
  for (int i = heads[u], v; i; i = e[i].nxt) {
    dfs1(v = e[i].v);
    siz[u] += siz[v = e[i].v];
    if (!son[u] && siz[son[u]] < siz[v = e[i].v]) son[u] = v = e[i].v;
  }
}

void dfs2(int u, int t) {
  dfn[u] = dfc++;
  top[u] = t;
  if (son[u]) dfs2(son[u], t);
  for (int i = heads[u], v; i; i = e[i].nxt)
    if ((v = e[i].v) != son[u]) dfs2(v, v);
  dfr[u] = dfc - 1;
}

inline int getlca(int u, int v) {
  while (top[u] != top[v])
    dep[top[u]] > dep[top[v]] ? u = fa[top[u]] : v = fa[top[v]];
  return dep[u] > dep[v] ? v : u;
}

ll bit[N];

void modify(int x, int v) {
  for (; x <= n; x += x & -x) bit[x] += v;
}

ll query(int x) {
  ll Ans = 0;
  for (; x; x -= x & -x) Ans += bit[x];
  return Ans;
}

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen64("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen64("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("sign.in", "r", stdin);
  freopen("sign.out", "w", stdout);
#endif
#endif

  read(n), read(q);
  for (int i = 1; i <= n; ++i) read(A[i]);
  int tot = 0;
  for (int i = n; i; --i) {
    while (tot && A[stk[tot]] <= A[i]) --tot;
    fa[i] = stk[tot];
    add(stk[tot], i);
    stk[++tot] = i;
  }
  dfs1(0);
  dfs2(0, 0);
  for (int i = 1, x; i <= n; ++i)
    read(x), bit[dfn[i]] += x, bit[dfr[i] + 1] -= x;
  for (int i = 1; i <= n; ++i)
    if (i + (i & -i) <= n) bit[i + (i & -i)] += bit[i];
  for (int op, x, y, lca; q; --q) {
    read(op), read(x), read(y);
    if (op == 1) {
      modify(dfn[x], y);
      modify(dfn[x] + 1, y);
      modify(dfr[x] + 1, -y * 2);
    } else {
      lca = getlca(x, y);
      ll w = query(dfn[x]) + query(dfn[y]) - query(dfn[lca]);
      if (lca == x || lca == y) lca = fa[lca];
      if (!lca) puts("?");
      else
        printf("%lld\n", w - query(dfn[fa[lca]]));
    }
  }
  return 0;
}